	var $form = $('#budgetYearStatisticFrom');
	$(document).ready(function() {
		var $form_div = $("#budgetYearStatisticFrom div");
		winResize($form_div);
		$(window).resize(function() {// 当调整浏览器窗口的大小时，发生 resize 事件
			winResize($form_div);
		});
		tabsSelect();
		loadqueryTable();
		loadauditTable();
	});
	
	function  loadqueryTable()
	{	
		$('#auditBudgetYear_datagrid').datagrid({
			cls: "theme-datagrid",
			  singleSelect:true,  
			  rownumbers: true,
//			  toolbar: '#querytb',
			  fitColumns:true,
			  collapsible: true,
			  url: "budgetYearStatistic/getAuditinfo",
			  queryParams: sy.serializeObject($form),
//			  pagination: true,
//			  pageSize: 10,
//			  method: 'post'
//			  remoteSort:false,
//			  multiSort:true
		});
	}
	
	function  loadauditTable()
	{
		$('#queryBudgetYear_datagrid').datagrid({
			cls: "theme-datagrid",
			  singleSelect:true,  
			  rownumbers: true,
//			  toolbar: '#audittb',
			  fitColumns:true,
			  collapsible: true,
			  url: "budgetYearStatistic/getQueryinfo",
			  queryParams: sy.serializeObject($form),
//			  pagination: true,
//			  pageSize: 10,
//			  method: 'post'
//			  remoteSort:false,
//			  multiSort:true
		});
	}
	
	function  searchFrom()
	{
		loadqueryTable();
		loadauditTable();
	}
	
	/*tab选中事件
	 * 
	 */	
	function  tabsSelect()
	{
		 $('#budgetYearStatistic_tabs').tabs({  
			 	border:false,
		        onSelect:function(title){ 
		    	  if(title=="年度预算审核")
		    	  {		
		    		  $('#auditBudgetYear_datagrid').datagrid("reload");
		    	  }
		    	  if(title=="年度预算查询")
		    	  {		
		    		  $('#queryBudgetYear_datagrid').datagrid("reload");
		    	  }
		          
		      }   
		 });
	}
	
	function  passverification(ids)
	{
		var url = "/budgetYearStatistic/passverification";
		var param = {
				'ids':ids,
				'checkstate':'1'
			};
		var redata = common_ajax.ajaxFunc(url,param);
		if(redata == "200")
		{
			 $.slideMsg("审核成功", parent.$);
			 $('#auditBudgetYear_datagrid').datagrid("reload");
		}else
		{
			$.alert(parent.$, "操作失败！！");
		}
	}
	function  ok()
	{	
		
		var ids=$('#noaudit').val();
		var checkReason=$('#checkReason').val();
		var url = "/budgetYearStatistic/passverification";
		var param = {
				'ids':ids,
				'checkReason':checkReason,
				'checkstate':'0'
			};
		var redata = common_ajax.ajaxFunc(url,param);
		if(redata == "200")
		{
			 $.slideMsg("操作成功", parent.$);
			 $('#budgetYearStatistic_window').window('close');
			 $('#auditBudgetYear_datagrid').datagrid("reload");
		}else
		{
			$.alert(parent.$, "操作失败！！");
			$('#budgetYearStatistic_window').window('close');
		}
	}
	
	function  votedown(ids)
	{
		$('#budgetYearStatistic_window').window('open');
		$('#noaudit').val(ids);
	}